/**
 * 评论相关请求模块
 */

 import request from '@/utils/request.js'

 // 获取制定文章的评论数据

 const getArticleComment = (queryInfo) => {
    return request({
        url: '/v1_0/comments',
        method: 'GET',
        params:{
            ...queryInfo
        }
    })
 }

 // 提交评论

 const addArticleComment = (commentInfo)  => {
     return request({
         url: '/v1_0/comments',
         method: 'POST',
         data: {
            ...commentInfo
         }
     })
 }

 // 获取评论回复

 const getReplayComment = (queryInfo) =>  {
     return request({
         url: '/v1_0/comments',
         method: 'GET',
         params: {
            ...queryInfo
         }
     })
 }

 export {
    getArticleComment,
    addArticleComment,
    getReplayComment
 }